package com.milotnt.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.milotnt.pojo.ClassOrderDto;
import com.milotnt.pojo.ClassOrder;

import java.util.List;

/**
 * @author ZhangMing [1157038410@qq.com]
 * @date 2021/8/11
 */

public interface ClassOrderService extends IService<ClassOrder> {

    //查询所有报名表信息
    List<ClassOrder> findAll();

    //添加报名信息
    Boolean insertClassOrder(ClassOrder classOrder);

    //根据会员账号查询个人报名课表
    List<ClassOrderDto> selectClassOrderByMemberAccount(Integer memberAccount);

    //删除已预约的课程
    Boolean deleteByClassOrderId(Integer classOrderId);

    //查询会员是否报名该课程
    ClassOrder selectMemberByClassIdAndMemberAccount(Integer classId, Integer memberAccount);

    //根据课程id查询所有报名的会员
    List<ClassOrder> selectMemberOrderList(Integer classId);

    // 根据会员的会员号，展示当前会员最近5个将要开课的课程
    List<ClassOrder> recentClass(Integer memberAccount);
}
